Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a problem in which only ConfigId was calculated first when the API parameter was set to Known After Apply #16946

Conversation

modular-magician
Copy link
Collaborator

If certain attributes such as protoc_output_base64 are modified, the config_id is pre-computed, but if these attributes are (known after apply) at plan time and there is no diff as a result of apply, the plan result will not match, Error: Provider produced inconsistent final plan.
Therefore, if these attributes are modified and their values are non-deterministic, the config_id is now also calculated at apply time.

The added test case has the dependency endpoints <- key2 <- key1, and the attribute of key2 is used in grpc_config of endpoints.
If the attribute of key2 referenced in endpoints is known after apply for some reason, and as a result there is no diff in the attribute of key2, only the config_id will be changed, but in that case it will not be applied and Provider produced inconsistent final plan error happened.

As a specific case, we have confirmed the occurrence of this problem in the product code in cases where grpc-config, protoc-descriptor, etc. are obtained through multiple resources such as local_file, etc. and external files obtained by null_resource.

I have closed P/R and newly opened because discovering that the previous P/R had many incorrect modified source code, corrections, tests, etc.

Fixes #11776

Release Note Template for Downstream PRs (will be copied)

servicemanagement: fixed issue in `google_endpoints_service` where an inconsistent plan would be created when certain fields had computed values 

Derived from GoogleCloudPlatform/magic-modules#9708

…elds were unknown at plan time (hashicorp#9708)

* Add case of valueUnknown in configId pre-computing

* add openapi parameters test
[upstream:37b21aabe9e09ada0614411ed558487cae0785fc]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit eb3388c into hashicorp:main Jan 9, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_endpoints_service detects false changes when passing openapi config as template_file
1 participant